Skip to content

Fix content app directory listing links with colons in base_path#7393

Merged
gerrod3 merged 1 commit into
pulp:mainfrom
gerrod3:fix/6955-colon-in-base-path-links
Jul 13, 2026
Merged

Fix content app directory listing links with colons in base_path#7393
gerrod3 merged 1 commit into
pulp:mainfrom
gerrod3:fix/6955-colon-in-base-path-links

Conversation

@gerrod3

@gerrod3 gerrod3 commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fixes broken links in the content app's directory listing when a distribution's base_path contains colons (e.g. copr-pull-requests:pr:3825/).
  • Browsers were interpreting the text before the colon as a URL scheme. Prepending ./ to the href ensures the link is always treated as a relative path.

Test plan

  • Added unit tests for render_html with and without colons in directory names.
  • CI passes.

closes #6955

Made with Cursor

@gerrod3 gerrod3 force-pushed the fix/6955-colon-in-base-path-links branch from 0a21ea1 to e753f40 Compare March 4, 2026 21:03
@gerrod3

gerrod3 commented Mar 4, 2026

Copy link
Copy Markdown
Contributor Author

I wonder if changing to the a href=./path nomenclature would break more plugins and their tests.

@gerrod3 gerrod3 marked this pull request as draft March 5, 2026 02:32
@stale

stale Bot commented Jul 8, 2026

Copy link
Copy Markdown

This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!

@stale stale Bot added the stale label Jul 8, 2026
closes pulp#6955

Assisted-by: Claude (Cursor)
Made-with: Cursor
Co-authored-by: Cursor <cursoragent@cursor.com>
@gerrod3 gerrod3 force-pushed the fix/6955-colon-in-base-path-links branch from e753f40 to dc7c6a1 Compare July 9, 2026 18:46
@gerrod3 gerrod3 marked this pull request as ready for review July 9, 2026 19:23
@stale

stale Bot commented Jul 9, 2026

Copy link
Copy Markdown

This pull request is no longer marked for closure.

@stale stale Bot removed the stale label Jul 9, 2026
@gerrod3 gerrod3 merged commit e8937bc into pulp:main Jul 13, 2026
13 of 14 checks passed
@patchback

patchback Bot commented Jul 13, 2026

Copy link
Copy Markdown

Backport to 3.63: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply e8937bc on top of patchback/backports/3.63/e8937bc5ab0c7672ebd641bdd932816ba98c8b33/pr-7393

Backporting merged PR #7393 into main

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/pulp/pulpcore.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/3.63/e8937bc5ab0c7672ebd641bdd932816ba98c8b33/pr-7393 upstream/3.63
  4. Now, cherry-pick PR Fix content app directory listing links with colons in base_path #7393 contents into that branch:
    $ git cherry-pick -x e8937bc5ab0c7672ebd641bdd932816ba98c8b33
    If it'll yell at you with something like fatal: Commit e8937bc5ab0c7672ebd641bdd932816ba98c8b33 is a merge but no -m option was given., add -m 1 as follows instead:
    $ git cherry-pick -m1 -x e8937bc5ab0c7672ebd641bdd932816ba98c8b33
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR Fix content app directory listing links with colons in base_path #7393 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/3.63/e8937bc5ab0c7672ebd641bdd932816ba98c8b33/pr-7393
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback

patchback Bot commented Jul 13, 2026

Copy link
Copy Markdown

Backport to 3.73: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply e8937bc on top of patchback/backports/3.73/e8937bc5ab0c7672ebd641bdd932816ba98c8b33/pr-7393

Backporting merged PR #7393 into main

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/pulp/pulpcore.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/3.73/e8937bc5ab0c7672ebd641bdd932816ba98c8b33/pr-7393 upstream/3.73
  4. Now, cherry-pick PR Fix content app directory listing links with colons in base_path #7393 contents into that branch:
    $ git cherry-pick -x e8937bc5ab0c7672ebd641bdd932816ba98c8b33
    If it'll yell at you with something like fatal: Commit e8937bc5ab0c7672ebd641bdd932816ba98c8b33 is a merge but no -m option was given., add -m 1 as follows instead:
    $ git cherry-pick -m1 -x e8937bc5ab0c7672ebd641bdd932816ba98c8b33
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR Fix content app directory listing links with colons in base_path #7393 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/3.73/e8937bc5ab0c7672ebd641bdd932816ba98c8b33/pr-7393
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback

patchback Bot commented Jul 13, 2026

Copy link
Copy Markdown

Backport to 3.85: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply e8937bc on top of patchback/backports/3.85/e8937bc5ab0c7672ebd641bdd932816ba98c8b33/pr-7393

Backporting merged PR #7393 into main

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/pulp/pulpcore.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/3.85/e8937bc5ab0c7672ebd641bdd932816ba98c8b33/pr-7393 upstream/3.85
  4. Now, cherry-pick PR Fix content app directory listing links with colons in base_path #7393 contents into that branch:
    $ git cherry-pick -x e8937bc5ab0c7672ebd641bdd932816ba98c8b33
    If it'll yell at you with something like fatal: Commit e8937bc5ab0c7672ebd641bdd932816ba98c8b33 is a merge but no -m option was given., add -m 1 as follows instead:
    $ git cherry-pick -m1 -x e8937bc5ab0c7672ebd641bdd932816ba98c8b33
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR Fix content app directory listing links with colons in base_path #7393 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/3.85/e8937bc5ab0c7672ebd641bdd932816ba98c8b33/pr-7393
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback

patchback Bot commented Jul 13, 2026

Copy link
Copy Markdown

Backport to 3.114: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.114/e8937bc5ab0c7672ebd641bdd932816ba98c8b33/pr-7393

Backported as #7858

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback

patchback Bot commented Jul 13, 2026

Copy link
Copy Markdown

Backport to 3.105: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.105/e8937bc5ab0c7672ebd641bdd932816ba98c8b33/pr-7393

Backported as #7859

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

base_path with : causes a bad link in web browser

2 participants